package cn.com.dcsgo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * HelloController
 *
 * @author Dcsgo
 * @since 2025/2/25 10:40
 */
@Controller
public class HelloController {

    /**
     * ResponseBody注解表示返回的对象直接作为相应体(不进行视图的转换)
     * RequestMapping注解表示该方法为处理请求的方法，处理的请求路径为/springmvc/hello
     *
     * @return String
     */
    @ResponseBody
    @RequestMapping("springmvc/hello")
    public String hello() {
        System.out.println("HelloController.hello");
        return "Hello SpringMVC !!";
    }
}
